package Exercise;

class B{
    public B(){
        func();
    }

    public void func(){
        System.out.println("B::func()");
    }
}


public class D extends B{
    private int num = 1;

    @Override
    public void func() {
        System.out.println("D::func()" + num);
    }

    public static void main(String[] args) {
        D d = new D();
    }
}
